import http from '../index'

// 分页获取车次
export const getTrips = ({ ascended = null, current = null, size = null, sortFieldName = null, carSid = null, code = null, driverSid = null, state = null, tripsCode = null }) => {
    return http.get("trips", { ascended, current, size, sortFieldName, carSid, code, driverSid, state, tripsCode })
}

// 根据sid获取车次
export const getTripDetail = ({ sid }) => {
    return http.get("trips/" + sid)
}

// 修改车次
export const editTrip = ({ sid, carSid, waybillSid, note = null, status = null }) => {
    return http.put("trips/" + sid, { carSid, waybillSid, note, status })
}

// 批量删除车次
export const delTrips = ({ sidList }) => {
    return http.put("trips/delete", { sidList })
}